#if !defined(AFX_CHARTSTOCKRTVIEW_H__120FBEE5_1213_4F92_BAB0_547EBA1A3B44__INCLUDED_)
#define AFX_CHARTSTOCKRTVIEW_H__120FBEE5_1213_4F92_BAB0_547EBA1A3B44__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//*******************************************************************************
// COPYRIGHT NOTES
// ---------------
// This is a sample for BCGControlBar Library Professional Edition
// Copyright (C) 1998-2016 BCGSoft Ltd.
// All rights reserved.
//
// This source code can be used, distributed or modified
// only under terms and conditions 
// of the accompanying license agreement.
//*******************************************************************************
//
// ChartStockRTView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CChartStockRTView form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif

#include "BCGPChartExampleDoc.h"
#include "BCGPChartExampleView.h"

class CChartStockRTView : public CBCGPChartExampleView
{
protected:
	CChartStockRTView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CChartStockRTView)

// Form Data
public:
	//{{AFX_DATA(CChartStockRTView)
	enum { IDD = IDD_CHART_STOCK_REAL_TIME };
	CBCGPButton	m_wndStart;
	CBCGPButton	m_wndCancel;
	CBCGPChartCtrl	m_wndChart;
	int		m_nLineType;
	BOOL	m_bAutoScroll;
	BOOL	m_bDataTable;
	//}}AFX_DATA

// Attributes
public:

	virtual CBCGPChartVisualObject* GetChart()
	{
		return m_wndChart.GetChart();
	}

	virtual CBCGPBaseVisualCtrl* GetCtrl()
	{
		return &m_wndChart;
	}

	virtual BOOL IsAnimationAvailable() const
	{
		return FALSE;
	}

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CChartStockRTView)
	protected:
	virtual void OnInitialUpdate();
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

	virtual void SetupLayout();

// Implementation
protected:
	virtual ~CChartStockRTView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CChartStockRTView)
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnStart();
	afx_msg void OnCancel();
	afx_msg void OnUpdateChart();
	afx_msg LRESULT OnChartAxisZoomed(WPARAM wp, LPARAM lp);
	afx_msg void OnClear();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	double				m_dblUpTrendLimit;
	CBCGPChartSeries*	m_pRSISeries;
	CBCGPChartObject*	m_pRSIInfoObject;
	CBCGPChartObject*	m_pOHLCInfo;

private:
	void SetBarLineWidth();
	CBCGPChartObject* SetupIndicatorObjects(double dblValue, CBCGPChartAxis* pIndicatorAxis, 
											const CString& strIndicatorName = _T(""));
	void GenerateDataPoint(double& dblOpen, double& dblHigh, double& dblLow, double& dblClose, double& dblTime);
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHARTSTOCKRTVIEW_H__120FBEE5_1213_4F92_BAB0_547EBA1A3B44__INCLUDED_)
